package com.orion.controller;


import com.orion.entity.Role;
import com.orion.entity.User;
import com.orion.service.TransService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Administrator
 * @date 2021/12/1
 */
@RestController
@RequestMapping("/trans")
public class TransController {

    @Resource(name = "transService")
    private TransService transService;

    @GetMapping("/save")
    public boolean save(User user, Role role) {
        return transService.saveUserRoleRela(user, role);
    }
}
